openapi: 3.0.1
info:
  title: LawVu Matters
  description: Apis for matter resources
  version: '1.0'
servers:
  - url: https://api-sandbox.lawvu.com/matter-apis
    description: Sandbox API
  - url: https://api.lawvu.com/matter-apis
    description: Production API
paths:
  /v1/mattercategories:
    get:
      tags:
        - MatterCategories
      summary: Matter categories
      description: Gets the configured categories for a matter
      operationId: get-v1-mattercategories
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/MatterCategoryArray'
            application/json:
              schema:
                $ref: '#/components/schemas/MatterCategoryArray'
            text/json:
              schema:
                $ref: '#/components/schemas/MatterCategoryArray'
  /v1/mattercategories/{categoryId}/createSchema:
    get:
      tags:
        - MatterCategories
      summary: Matter creation schema
      description: Get the form and fields for rendering a create matter form
      operationId: get-v1-mattercategories-categoryid-createschema
      parameters:
        - name: categoryId
          in: path
          description: The category to get the create form for
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
  /v1/matters/{matterId}/files:
    post:
      tags:
        - MatterFiles
      summary: Upload file
      description: "Add or update a file in a matter. \\\r\n \\\r\nThe body of the request must be content-type 'multipart/form-data' and contain the file data."
      operationId: post-v1-matters-matterid-files
      parameters:
        - name: matterId
          in: path
          description: The id of the matter
          required: true
          schema:
            type: integer
            format: int32
        - name: comments
          in: query
          description: Comments to be added to the file
          schema:
            type: string
        - name: parentFileId
          in: query
          description: Creates a new version for the specified parent file id
          schema:
            type: integer
            format: int32
        - name: folderId
          in: query
          description: The id of the folder to upload the file within
          schema:
            type: integer
            format: int32
        - name: conflictResolution
          in: query
          description: >-
            Defines behaviour for when a file conflict is
            found<p>Options:</p><ul><li>Replace</li><li>KeepBoth</li><li>SaveVersion</li><li>Skip</li></ul>
          schema:
            enum:
              - Replace
              - KeepBoth
              - SaveVersion
              - Skip
            type: string
            description: >-
              <p>Options:</p><ul><li>Replace</li><li>KeepBoth</li><li>SaveVersion</li><li>Skip</li></ul>
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
            encoding:
              file:
                style: form
      responses:
        '201':
          description: The id of the created file
          content:
            text/plain:
              schema:
                type: integer
                format: int32
            application/json:
              schema:
                type: integer
                format: int32
            text/json:
              schema:
                type: integer
                format: int32
        '204':
          description: When the file was skipped due to conflict resolution setting
  /v1/matters/quickfind:
    get:
      tags:
        - Matters
      summary: Find matters
      description: Quickly find and filter matters
      operationId: get-v1-matters-quickfind
      parameters:
        - name: term
          in: query
          description: A term to search matters by
          schema:
            type: string
        - name: includeRestricted
          in: query
          description: 'Include restricted matters in the search<p>Default: False</p>'
          schema:
            type: boolean
            default: false
        - name: take
          in: query
          description: 'The number of matters to return (maximum: 100, default: 20)'
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/QuickFindMatterArray'
            application/json:
              schema:
                $ref: '#/components/schemas/QuickFindMatterArray'
            text/json:
              schema:
                $ref: '#/components/schemas/QuickFindMatterArray'
  /v1/matters/recent:
    get:
      tags:
        - Matters
      summary: Recent  matters
      description: Returns recently viewed (ref:take) matters for the user
      operationId: get-v1-matters-recent
      parameters:
        - name: take
          in: query
          description: >-
            The maximum number of recently viewed matters to return<p>Default:
            5</p>
          schema:
            type: integer
            format: int32
            default: 5
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RecentMatterArray'
              example:
                - id: 95
                  name: My Matter
                  matterNumber: LV1234-0012
                  lastActivityDateUtc: '2023-12-15T20:30:00Z'
                  organisationId: 1234
                  managerId: C7541186-26CE-4C6C-ABFF-37FE3EF57F88
                  ownerId: 08FD1ED1-627E-4CB9-8388-731227584D21
                - id: 789
                  name: Another Matter
                  matterNumber: LV1234-0099
                  lastActivityDateUtc: '2024-01-12T10:00:00Z'
                  organisationId: 1234
                  managerId: null
                  ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
                - id: 684
                  name: Different Matter
                  matterNumber: LV1234-0054
                  lastActivityDateUtc: '2023-12-10T15:30:00Z'
                  organisationId: 1234
                  managerId: C7541186-26CE-4C6C-ABFF-37FE3EF57F88
                  ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
            application/json:
              schema:
                $ref: '#/components/schemas/RecentMatterArray'
              example:
                - id: 95
                  name: My Matter
                  matterNumber: LV1234-0012
                  lastActivityDateUtc: '2023-12-15T20:30:00Z'
                  organisationId: 1234
                  managerId: C7541186-26CE-4C6C-ABFF-37FE3EF57F88
                  ownerId: 08FD1ED1-627E-4CB9-8388-731227584D21
                - id: 789
                  name: Another Matter
                  matterNumber: LV1234-0099
                  lastActivityDateUtc: '2024-01-12T10:00:00Z'
                  organisationId: 1234
                  managerId: null
                  ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
                - id: 684
                  name: Different Matter
                  matterNumber: LV1234-0054
                  lastActivityDateUtc: '2023-12-10T15:30:00Z'
                  organisationId: 1234
                  managerId: C7541186-26CE-4C6C-ABFF-37FE3EF57F88
                  ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
            text/json:
              schema:
                $ref: '#/components/schemas/RecentMatterArray'
              example:
                - id: 95
                  name: My Matter
                  matterNumber: LV1234-0012
                  lastActivityDateUtc: '2023-12-15T20:30:00Z'
                  organisationId: 1234
                  managerId: C7541186-26CE-4C6C-ABFF-37FE3EF57F88
                  ownerId: 08FD1ED1-627E-4CB9-8388-731227584D21
                - id: 789
                  name: Another Matter
                  matterNumber: LV1234-0099
                  lastActivityDateUtc: '2024-01-12T10:00:00Z'
                  organisationId: 1234
                  managerId: null
                  ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
                - id: 684
                  name: Different Matter
                  matterNumber: LV1234-0054
                  lastActivityDateUtc: '2023-12-10T15:30:00Z'
                  organisationId: 1234
                  managerId: C7541186-26CE-4C6C-ABFF-37FE3EF57F88
                  ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
  /v1/matters:
    post:
      tags:
        - Matters
      summary: Create matter
      description: Creates a new matter with the supplied values
      operationId: post-v1-matters
      requestBody:
        description: ''
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/CreateMatter'
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMatter'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateMatter'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateMatter'
        required: true
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                type: integer
                format: int32
            application/json:
              schema:
                type: integer
                format: int32
            text/json:
              schema:
                type: integer
                format: int32
    get:
      tags:
        - Matters
      summary: Get matters
      description: "Gets matters filtered by single or multiple fields.\r\n<br /> \r\n_To filter by one field_: \"filtering.field\", \"filtering.operator\" and \"filtering.value\" parameters must be filled.\r\n<br /> \r\n_To filter by multiple fields_: \"filtering.logic\" and \"filtering.filters\" parameters must be filled."
      operationId: get-v1-matters
      parameters:
        - name: skip
          in: query
          description: The number of matters to skip (used for paging)
          schema:
            type: integer
            format: int32
        - name: fields
          in: query
          description: Fields to include in the response
          schema:
            type: array
            items:
              type: string
        - name: filtering.logic
          in: query
          description: >-
            Gets or sets the filtering logic for filters. Value by default is
            'and'
          schema:
            enum:
              - and
              - or
            type: string
        - name: filtering.filters
          in: query
          description: "Array of filters object (optional)\r\n<br /> \r\n_Object Properties_:\r\n<br /> \r\n* _Field_: field to filter by\r\n<br /> \r\n* _Operator_: operator used to filter by\r\n<br /> \r\n* _Value_: value to filter by"
          schema:
            $ref: '#/components/schemas/FilteringArray'
        - name: filtering.field
          in: query
          description: Field to filter by (optional)
          schema:
            type: string
        - name: filtering.operator
          in: query
          description: Operator used for filtering (optional)
          schema:
            enum:
              - eq
              - neq
              - lt
              - lte
              - gt
              - gte
              - startswith
              - endswith
              - contains
              - doesnotcon
              - isnull
            type: string
        - name: filtering.value
          in: query
          description: Value to filter by (optional)
          schema:
            type: string
        - name: sorting.direction
          in: query
          description: Set the sorting direction
          schema:
            enum:
              - asc
              - desc
            type: string
        - name: sorting.field
          in: query
          description: Set the sorting fields
          schema:
            type: string
        - name: take
          in: query
          description: 'The maximum number of matters to return<p>Default: 50</p>'
          schema:
            type: integer
            format: int32
            default: 50
        - name: context
          in: query
          description: >-
            Controls the scope of matters returned by this operation<p>Default:
            Personal</p><p>Options:</p><ul><li>All - Returns all matters
            regardless of whether the authenticated user is a member. Requires
            the authenticated user to be a member of the Matter Administrators
            security group</li><li>Personal - Returns matters which the
            authenticated user is a member of. Equivalent to the "My matters"
            view in LawVu</li><li>Intake - Returns all matters in the Intake
            queue. Requires the authenticated user to have the 'Manage intake'
            permission</li><li>Teams - Returns all matters that are accessible
            by teams that the authenticated user is a member
            of</li><li>Restricted - Returns restricted matters. Requires the
            authenticated user to be an Organization Administrator</li></ul>
          schema:
            enum:
              - All
              - Personal
              - Intake
              - Teams
              - Restricted
            type: string
            description: >-
              <p>Options:</p><ul><li>All - Returns all matters regardless of
              whether the authenticated user is a member. Requires the
              authenticated user to be a member of the Matter Administrators
              security group</li><li>Personal - Returns matters which the
              authenticated user is a member of. Equivalent to the "My matters"
              view in LawVu</li><li>Intake - Returns all matters in the Intake
              queue. Requires the authenticated user to have the 'Manage intake'
              permission</li><li>Teams - Returns all matters that are accessible
              by teams that the authenticated user is a member
              of</li><li>Restricted - Returns restricted matters. Requires the
              authenticated user to be an Organization Administrator</li></ul>
            default: Personal
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectDataSourceResultModel'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectDataSourceResultModel'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectDataSourceResultModel'
  /v1/matters/{matterId}:
    get:
      tags:
        - Matters
      summary: Get matter
      description: 'Gets the details of the selected matter (ref: matterId)'
      operationId: get-v1-matters-matterid
      parameters:
        - name: matterId
          in: path
          description: The Id of the matter (e.g. 1234)
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Matter'
            application/json:
              schema:
                $ref: '#/components/schemas/Matter'
            text/json:
              schema:
                $ref: '#/components/schemas/Matter'
    patch:
      tags:
        - Matters
      summary: Update matter
      operationId: patch-v1-matters-matterid
      parameters:
        - name: matterId
          in: path
          description: The Id of the matter
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: The update request (in jsonpatch format)
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/OperationArray'
          application/json:
            schema:
              $ref: '#/components/schemas/OperationArray'
          text/json:
            schema:
              $ref: '#/components/schemas/OperationArray'
          application/*+json:
            schema:
              $ref: '#/components/schemas/OperationArray'
      responses:
        '200':
          description: Success
  /v1/matters/{matterId}/users:
    post:
      tags:
        - Matters
      summary: Add user to a matter
      description: Adds a user to the matter (as owner, manager or regular matter member)
      operationId: post-v1-matters-matterid-users
      parameters:
        - name: matterId
          in: path
          description: The Id of the matter
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: Details about how to assign the user to the matter
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/AssignMatterUser'
          application/json:
            schema:
              $ref: '#/components/schemas/AssignMatterUser'
          text/json:
            schema:
              $ref: '#/components/schemas/AssignMatterUser'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AssignMatterUser'
        required: true
      responses:
        '200':
          description: Success
    get:
      tags:
        - Matters
      summary: Get matter users
      description: Returns the users that are assigned to the matter
      operationId: get-v1-matters-matterid-users
      parameters:
        - name: matterId
          in: path
          description: The matter id
          required: true
          schema:
            type: integer
            format: int32
        - name: skip
          in: query
          description: The number of results to skip
          schema:
            type: integer
            format: int32
        - name: filtering.field
          in: query
          description: Field to filter by (optional)
          schema:
            type: string
        - name: filtering.operator
          in: query
          description: Operator used for filtering (optional)
          schema:
            enum:
              - eq
              - neq
              - lt
              - lte
              - gt
              - gte
              - startswith
              - endswith
              - contains
              - doesnotcon
              - isnull
            type: string
        - name: filtering.value
          in: query
          description: Value to filter by (optional)
          schema:
            type: string
        - name: sorting.direction
          in: query
          description: Set the sorting direction
          schema:
            enum:
              - asc
              - desc
            type: string
        - name: sorting.field
          in: query
          description: Set the sorting fields
          schema:
            type: string
        - name: take
          in: query
          description: 'The maximum number of matter users to return<p>Default: 50</p>'
          schema:
            type: integer
            format: int32
            default: 50
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/MatterUserDataSourceResult'
            application/json:
              schema:
                $ref: '#/components/schemas/MatterUserDataSourceResult'
            text/json:
              schema:
                $ref: '#/components/schemas/MatterUserDataSourceResult'
  /v1/matters/externalid/{externalId}:
    get:
      tags:
        - Matters
      summary: ExternalId lookup
      operationId: get-v1-matters-externalid-externalid
      parameters:
        - name: externalId
          in: path
          description: The externalId to lookup
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ExternalIdLookupModel'
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalIdLookupModel'
            text/json:
              schema:
                $ref: '#/components/schemas/ExternalIdLookupModel'
  /v1/matters/{matterId}/fields:
    get:
      tags:
        - Matters
      summary: Get matter fields
      description: Get matter fields by matter id
      operationId: get-v1-matters-matterid-fields
      parameters:
        - name: matterId
          in: path
          description: The Id of the matter
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/MatterFieldData'
              example:
                detailFields:
                  schema:
                    properties:
                      field_1:
                        fieldId: 1
                        title: An example field name
                        description: Example field description
                        lawvuType: 7
                        isReadOnly: false
                        type: boolean
                        label: ''
                    order:
                      - field_1
                    required:
                      - field_1
                  model:
                    field_1: true
                coreFields:
                  schema: null
                  model: null
            application/json:
              schema:
                $ref: '#/components/schemas/MatterFieldData'
              example:
                detailFields:
                  schema:
                    properties:
                      field_1:
                        fieldId: 1
                        title: An example field name
                        description: Example field description
                        lawvuType: 7
                        isReadOnly: false
                        type: boolean
                        label: ''
                    order:
                      - field_1
                    required:
                      - field_1
                  model:
                    field_1: true
                coreFields:
                  schema: null
                  model: null
            text/json:
              schema:
                $ref: '#/components/schemas/MatterFieldData'
              example:
                detailFields:
                  schema:
                    properties:
                      field_1:
                        fieldId: 1
                        title: An example field name
                        description: Example field description
                        lawvuType: 7
                        isReadOnly: false
                        type: boolean
                        label: ''
                    order:
                      - field_1
                    required:
                      - field_1
                  model:
                    field_1: true
                coreFields:
                  schema: null
                  model: null
    patch:
      tags:
        - Matters
      summary: Update fields
      operationId: patch-v1-matters-matterid-fields
      parameters:
        - name: matterId
          in: path
          description: The Id of the matter
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: The update request (in jsonpatch format)
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/OperationArray'
            examples:
              string field:
                value:
                  value: new value
                  path: /field_string
                  op: replace
              number field:
                value:
                  value: 123
                  path: /field_number
                  op: replace
              date field:
                value:
                  value: '2022-03-03'
                  path: /field_date
                  op: replace
              boolean field:
                value:
                  value: true
                  path: /field_bool
                  op: replace
              object field:
                value:
                  value:
                    id: object_id
                  path: /field_object
                  op: replace
              array field:
                value:
                  value:
                    - 1
                    - 2
                    - 3
                  path: /field_array
                  op: replace
              group field:
                value:
                  value: string under a group
                  path: /group1/field_string
                  op: replace
              nested group field:
                value:
                  value: string under multiple groups
                  path: /group1/group2/group3/field_string
                  op: replace
          application/json:
            schema:
              $ref: '#/components/schemas/OperationArray'
            examples:
              string field:
                value:
                  value: new value
                  path: /field_string
                  op: replace
              number field:
                value:
                  value: 123
                  path: /field_number
                  op: replace
              date field:
                value:
                  value: '2022-03-03'
                  path: /field_date
                  op: replace
              boolean field:
                value:
                  value: true
                  path: /field_bool
                  op: replace
              object field:
                value:
                  value:
                    id: object_id
                  path: /field_object
                  op: replace
              array field:
                value:
                  value:
                    - 1
                    - 2
                    - 3
                  path: /field_array
                  op: replace
              group field:
                value:
                  value: string under a group
                  path: /group1/field_string
                  op: replace
              nested group field:
                value:
                  value: string under multiple groups
                  path: /group1/group2/group3/field_string
                  op: replace
          text/json:
            schema:
              $ref: '#/components/schemas/OperationArray'
            examples:
              string field:
                value:
                  value: new value
                  path: /field_string
                  op: replace
              number field:
                value:
                  value: 123
                  path: /field_number
                  op: replace
              date field:
                value:
                  value: '2022-03-03'
                  path: /field_date
                  op: replace
              boolean field:
                value:
                  value: true
                  path: /field_bool
                  op: replace
              object field:
                value:
                  value:
                    id: object_id
                  path: /field_object
                  op: replace
              array field:
                value:
                  value:
                    - 1
                    - 2
                    - 3
                  path: /field_array
                  op: replace
              group field:
                value:
                  value: string under a group
                  path: /group1/field_string
                  op: replace
              nested group field:
                value:
                  value: string under multiple groups
                  path: /group1/group2/group3/field_string
                  op: replace
          application/*+json:
            schema:
              $ref: '#/components/schemas/OperationArray'
            examples:
              string field:
                value:
                  value: new value
                  path: /field_string
                  op: replace
              number field:
                value:
                  value: 123
                  path: /field_number
                  op: replace
              date field:
                value:
                  value: '2022-03-03'
                  path: /field_date
                  op: replace
              boolean field:
                value:
                  value: true
                  path: /field_bool
                  op: replace
              object field:
                value:
                  value:
                    id: object_id
                  path: /field_object
                  op: replace
              array field:
                value:
                  value:
                    - 1
                    - 2
                    - 3
                  path: /field_array
                  op: replace
              group field:
                value:
                  value: string under a group
                  path: /group1/field_string
                  op: replace
              nested group field:
                value:
                  value: string under multiple groups
                  path: /group1/group2/group3/field_string
                  op: replace
      responses:
        '200':
          description: Success
  /v1/matters/{matterId}/invoices:
    get:
      tags:
        - MattersInvoices
      summary: Get matter invoices
      operationId: get-v1-matters-matterid-invoices
      parameters:
        - name: matterId
          in: path
          description: The Id of the matter
          required: true
          schema:
            type: integer
            format: int32
        - name: skip
          in: query
          description: The number of matter invoices to skip (used for paging)
          schema:
            type: integer
            format: int32
        - name: filtering.field
          in: query
          description: Field to filter by (optional)
          schema:
            type: string
        - name: filtering.operator
          in: query
          description: Operator used for filtering (optional)
          schema:
            enum:
              - eq
              - neq
              - lt
              - lte
              - gt
              - gte
              - startswith
              - endswith
              - contains
              - doesnotcon
              - isnull
            type: string
        - name: filtering.value
          in: query
          description: Value to filter by (optional)
          schema:
            type: string
        - name: sorting.direction
          in: query
          description: Set the sorting direction
          schema:
            enum:
              - asc
              - desc
            type: string
        - name: sorting.field
          in: query
          description: Set the sorting fields
          schema:
            type: string
        - name: take
          in: query
          description: 'The maximum number of matter invoices to return<p>Default: 50</p>'
          schema:
            type: integer
            format: int32
            default: 50
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/InvoiceDataSourceResult'
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDataSourceResult'
            text/json:
              schema:
                $ref: '#/components/schemas/InvoiceDataSourceResult'
  /v1/matters/{matterId}/statusMessages:
    post:
      tags:
        - MatterStatusMessage
      summary: Add a status message to a matter
      description: Adds a status message to a matter
      operationId: post-v1-matters-matterid-statusmessages
      parameters:
        - name: matterId
          in: path
          description: The Id of the matter
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: The status message to add
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/MatterStatusMessageModel'
            example:
              StatusMessage: Test status message
          application/json:
            schema:
              $ref: '#/components/schemas/MatterStatusMessageModel'
            example:
              StatusMessage: Test status message
          text/json:
            schema:
              $ref: '#/components/schemas/MatterStatusMessageModel'
            example:
              StatusMessage: Test status message
          application/*+json:
            schema:
              $ref: '#/components/schemas/MatterStatusMessageModel'
            example:
              StatusMessage: Test status message
        required: true
      responses:
        '204':
          description: No Content
  /v1/matters/tasks:
    get:
      tags:
        - MatterTasks
      summary: Get tasks
      operationId: get-v1-matters-tasks
      parameters:
        - name: skip
          in: query
          description: Number of tasks to skip (used for paging)
          schema:
            type: integer
            format: int32
        - name: filtering.field
          in: query
          description: Field to filter by (optional)
          schema:
            type: string
        - name: filtering.operator
          in: query
          description: Operator used for filtering (optional)
          schema:
            enum:
              - eq
              - neq
              - lt
              - lte
              - gt
              - gte
              - startswith
              - endswith
              - contains
              - doesnotcon
              - isnull
            type: string
        - name: filtering.value
          in: query
          description: Value to filter by (optional)
          schema:
            type: string
        - name: sorting.direction
          in: query
          description: Set the sorting direction
          schema:
            enum:
              - asc
              - desc
            type: string
        - name: sorting.field
          in: query
          description: Set the sorting fields
          schema:
            type: string
        - name: take
          in: query
          description: 'The maximum number of tasks to return<p>Default: 50</p>'
          schema:
            type: integer
            format: int32
            default: 50
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/TaskSummaryArray'
            application/json:
              schema:
                $ref: '#/components/schemas/TaskSummaryArray'
            text/json:
              schema:
                $ref: '#/components/schemas/TaskSummaryArray'
  /v1/matters/tasktemplates:
    get:
      tags:
        - MatterTaskTemplates
      summary: Get task templates
      description: Gets task templates
      operationId: get-v1-matters-tasktemplates
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/TaskTemplatesArray'
              example:
                - id: 1
                  name: name task template 1
                  description: description task template 1
                  createdDateUtc: '2025-01-21T00:44:46.8310951+00:00'
                - id: 2
                  name: name task template 2
                  description: description task template 2
                  createdDateUtc: '2025-01-21T00:44:46.8311252+00:00'
            application/json:
              schema:
                $ref: '#/components/schemas/TaskTemplatesArray'
              example:
                - id: 1
                  name: name task template 1
                  description: description task template 1
                  createdDateUtc: '2025-01-21T00:44:46.8310951+00:00'
                - id: 2
                  name: name task template 2
                  description: description task template 2
                  createdDateUtc: '2025-01-21T00:44:46.8311252+00:00'
            text/json:
              schema:
                $ref: '#/components/schemas/TaskTemplatesArray'
              example:
                - id: 1
                  name: name task template 1
                  description: description task template 1
                  createdDateUtc: '2025-01-21T00:44:46.8310951+00:00'
                - id: 2
                  name: name task template 2
                  description: description task template 2
                  createdDateUtc: '2025-01-21T00:44:46.8311252+00:00'
  /v1/matters/{matterId}/taskTemplates:
    post:
      tags:
        - MatterTaskTemplates
      summary: Add a task template to matter
      description: Adds a task template to a matter
      operationId: post-v1-matters-matterid-tasktemplates
      parameters:
        - name: matterId
          in: path
          description: The ID of the matter
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: The ID of the task template
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/AddTaskFromTemplateModel'
            example:
              templateId: 1
          application/json:
            schema:
              $ref: '#/components/schemas/AddTaskFromTemplateModel'
            example:
              templateId: 1
          text/json:
            schema:
              $ref: '#/components/schemas/AddTaskFromTemplateModel'
            example:
              templateId: 1
          application/*+json:
            schema:
              $ref: '#/components/schemas/AddTaskFromTemplateModel'
            example:
              templateId: 1
        required: true
      responses:
        '204':
          description: No Content
components:
  schemas:
    AddTaskFromTemplateModel:
      required:
        - templateId
      type: object
      properties:
        templateId:
          type: integer
          format: int32
      additionalProperties: false
    AssignMatterUser:
      required:
        - target
        - userId
      type: object
      properties:
        userId:
          type: string
          description: The ID of the user
        target:
          enum:
            - Matter
            - MatterOwner
            - MatterManager
          type: string
          description: >-
            The target of the assignment (Matter, MatterOwner or
            MatterManager)<p>Options:</p><ul><li>Matter</li><li>MatterOwner</li><li>MatterManager</li></ul>
        note:
          type: string
          description: An optional note
          nullable: true
      additionalProperties: false
    CreateMatter:
      required:
        - categoryId
      type: object
      properties:
        name:
          type: string
          description: Name of the matter
          nullable: true
        categoryId:
          type: integer
          description: 'To retrieve categories ref: /mattercategories'
          format: int32
        organisationId:
          type: integer
          description: Leave null for default organisation
          format: int32
          nullable: true
        fields:
          type: object
          description: "To retrieve fields for matter creation ref: mattercategories/{categoryId}/createSchema\r\nFields without grouping example serialization: \"fields\":{ \"field_[fieldId]\":null, \"field_[fieldId]\":false }\r\nFields with grouping example serialization: \"fields\":{ \"group_[groupId]\": { \"field_[fieldId]\":null, \"field_[fieldId]\":false } }"
          nullable: true
        restricted:
          type: boolean
          description: Is the matter restricted
        urgent:
          type: boolean
          description: Is the matter urgent
        parentId:
          type: integer
          format: int32
          nullable: true
        managerId:
          type: string
          description: Optionally set the Manager of the new Matter
          nullable: true
        ownerId:
          type: string
          description: Optionally set the Owner of the new Matter
          nullable: true
        externalId:
          type: string
          description: >-
            Optionally set an ID from an external system. Uniqueness is enforced
            for your organisation
          nullable: true
        teamId:
          type: integer
          description: >-
            Set the team assignment. This can be required
            [ref:MatterTemplate.TeamRequired]
          format: int32
          nullable: true
      additionalProperties: false
    ExternalIdLookupModel:
      type: object
      properties:
        id:
          type: integer
          format: int32
      additionalProperties: false
    FieldData:
      type: object
      properties:
        schema:
          type: object
          nullable: true
        model:
          type: object
          nullable: true
      additionalProperties: false
    Filtering:
      type: object
      properties:
        field:
          type: string
          description: Field to filter by (optional)
          nullable: true
        operator:
          enum:
            - eq
            - neq
            - lt
            - lte
            - gt
            - gte
            - startswith
            - endswith
            - contains
            - doesnotcon
            - isnull
          type: string
          description: >-
            Operator used for filtering
            (optional)<p>Options:</p><ul><li>eq</li><li>neq</li><li>lt</li><li>lte</li><li>gt</li><li>gte</li><li>startswith</li><li>endswith</li><li>contains</li><li>doesnotcon</li><li>isnull</li></ul>
        value:
          type: string
          description: Value to filter by (optional)
          nullable: true
      additionalProperties: false
    FilteringArray:
      type: array
      items:
        $ref: '#/components/schemas/Filtering'
    Invoice:
      type: object
      properties:
        id:
          type: integer
          format: int32
        invoiceNo:
          type: string
          nullable: true
        invoiceDate:
          type: string
          format: date-time
          nullable: true
        dueDate:
          type: string
          format: date-time
          nullable: true
        disbursements:
          type: number
          format: double
          nullable: true
        fees:
          type: number
          format: double
          nullable: true
        otherFees:
          type: number
          format: double
          nullable: true
        fileId:
          type: integer
          format: int32
          nullable: true
        status:
          type: string
          nullable: true
        fileName:
          type: string
          nullable: true
        batchId:
          type: integer
          format: int32
        thirdParty:
          type: boolean
        paid:
          type: boolean
          nullable: true
        paidDateUtc:
          type: string
          format: date-time
          nullable: true
        description:
          type: string
          nullable: true
      additionalProperties: false
    InvoiceDataSourceResult:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Invoice'
          description: Represents a single page of processed data.
          nullable: true
        total:
          type: integer
          description: The total number of records available.
          format: int32
      additionalProperties: false
    Matter:
      type: object
      properties:
        id:
          type: integer
          format: int32
        matterNumber:
          type: string
          nullable: true
        matterUrl:
          type: string
          nullable: true
        createdDateUtc:
          type: string
          format: date-time
        managerOrganisationId:
          type: integer
          format: int32
          nullable: true
        owner:
          $ref: '#/components/schemas/MatterUser'
        manager:
          $ref: '#/components/schemas/MatterUser'
        organisationId:
          type: integer
          format: int32
        organisationName:
          type: string
          nullable: true
        lastStatusMessage:
          $ref: '#/components/schemas/StatusMessage'
        terms:
          $ref: '#/components/schemas/TermsAndConditions'
        matterSpecificEmail:
          type: string
          nullable: true
        tags:
          type: array
          items:
            $ref: '#/components/schemas/MatterTagModel'
          nullable: true
        categoryId:
          type: integer
          format: int32
        externalId:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        parentId:
          type: integer
          format: int32
          nullable: true
        restricted:
          type: boolean
        status:
          type: string
          nullable: true
        teamId:
          type: integer
          format: int32
          nullable: true
        urgent:
          type: boolean
      additionalProperties: false
    MatterCategory:
      type: object
      properties:
        id:
          type: integer
          format: int32
        parentId:
          type: integer
          format: int32
          nullable: true
        name:
          type: string
          nullable: true
        children:
          type: array
          items:
            $ref: '#/components/schemas/MatterCategory'
          nullable: true
        teamId:
          type: integer
          format: int32
          nullable: true
        isDeleted:
          type: boolean
        teamRequired:
          type: boolean
        hasRules:
          type: boolean
      additionalProperties: false
    MatterCategoryArray:
      type: array
      items:
        $ref: '#/components/schemas/MatterCategory'
    MatterFieldData:
      type: object
      properties:
        detailFields:
          $ref: '#/components/schemas/FieldData'
        coreFields:
          $ref: '#/components/schemas/FieldData'
      additionalProperties: false
    MatterStatusMessageModel:
      required:
        - statusMessage
      type: object
      properties:
        statusMessage:
          minLength: 1
          type: string
      additionalProperties: false
    MatterTagModel:
      type: object
      properties:
        id:
          type: integer
          format: int32
        description:
          type: string
          nullable: true
      additionalProperties: false
    MatterUser:
      type: object
      properties:
        userId:
          type: string
          description: ID of the user
          nullable: true
        userFirstname:
          type: string
          nullable: true
        userLastname:
          type: string
          nullable: true
        userOrganisationId:
          type: integer
          format: int32
          nullable: true
        userOrganisationName:
          type: string
          nullable: true
        userHasPicture:
          type: boolean
        userPictureCacheId:
          type: integer
          format: int32
        userFullName:
          type: string
          nullable: true
        userInitials:
          type: string
          nullable: true
        permissions:
          type: array
          items:
            type: integer
            format: int32
          description: The permissions that the user has for the matter
          nullable: true
        isDelegateOwner:
          type: boolean
          description: User has been assigned delegate owner
        isDelegateManager:
          type: boolean
          description: User is a delegate manager
      additionalProperties: false
    MatterUserDataSourceResult:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MatterUser'
          description: Represents a single page of processed data.
          nullable: true
        total:
          type: integer
          description: The total number of records available.
          format: int32
      additionalProperties: false
    ObjectDataSourceResultModel:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
          description: Represents a single page of processed data.
          nullable: true
        total:
          type: integer
          description: The total number of records available.
          format: int32
      additionalProperties: false
    Operation:
      type: object
      properties:
        value:
          type: object
          nullable: true
        path:
          type: string
          nullable: true
        op:
          type: string
          nullable: true
        from:
          type: string
          nullable: true
      additionalProperties: false
    OperationArray:
      type: array
      items:
        $ref: '#/components/schemas/Operation'
    QuickFindMatter:
      type: object
      properties:
        id:
          type: integer
          format: int32
        matterNumber:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        organisationName:
          type: string
          nullable: true
        reference:
          type: string
          nullable: true
        managerReference:
          type: string
          nullable: true
        purchaseOrderNumber:
          type: string
          nullable: true
        parentId:
          type: integer
          format: int32
          nullable: true
        organisationId:
          type: integer
          format: int32
      additionalProperties: false
    QuickFindMatterArray:
      type: array
      items:
        $ref: '#/components/schemas/QuickFindMatter'
    RecentMatter:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
          nullable: true
        matterNumber:
          type: string
          nullable: true
        lastActivityDateUtc:
          type: string
          description: The UTC date of when the current user last viewed the Matter
          format: date-time
          nullable: true
        organisationId:
          type: integer
          format: int32
        managerId:
          type: string
          nullable: true
        ownerId:
          type: string
          nullable: true
      additionalProperties: false
    RecentMatterArray:
      type: array
      items:
        $ref: '#/components/schemas/RecentMatter'
    StatusMessage:
      type: object
      properties:
        message:
          type: string
          nullable: true
        createdDateUtc:
          type: string
          format: date-time
        id:
          type: integer
          format: int32
        userId:
          type: string
          nullable: true
        userFirstname:
          type: string
          nullable: true
        userLastname:
          type: string
          nullable: true
        userOrganisationId:
          type: integer
          format: int32
          nullable: true
        userOrganisationName:
          type: string
          nullable: true
        userHasPicture:
          type: boolean
        userPictureCacheId:
          type: integer
          format: int32
        role:
          enum:
            - Administrator
            - InhouseLegal
            - Contributor
            - Standard
            - External
            - MatterManager
          type: string
          description: >-
            <p>Options:</p><ul><li>Administrator</li><li>InhouseLegal</li><li>Contributor</li><li>Standard</li><li>External</li><li>MatterManager</li></ul>
        userFullName:
          type: string
          nullable: true
        userInitials:
          type: string
          nullable: true
      additionalProperties: false
    TaskSummary:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
          nullable: true
        parentId:
          type: integer
          format: int32
          nullable: true
        matterId:
          type: integer
          format: int32
        type:
          enum:
            - Standard
            - Milestone
            - CourtDate
            - Meeting
          type: string
          description: >-
            <p>Options:</p><ul><li>Standard</li><li>Milestone</li><li>CourtDate</li><li>Meeting</li></ul>
        order:
          type: integer
          format: int32
        userAssignedId:
          type: string
          nullable: true
        createdDateUtc:
          type: string
          format: date-time
        modifiedDateUtc:
          type: string
          format: date-time
        dueDate:
          type: string
          format: date-time
          nullable: true
        duration:
          type: number
          format: double
        status:
          enum:
            - NotStarted
            - InProgress
            - Complete
            - NotRequired
            - OnHold
          type: string
          description: >-
            <p>Options:</p><ul><li>NotRequired</li><li>OnHold</li><li>NotStarted</li><li>InProgress</li><li>Complete</li></ul>
      additionalProperties: false
    TaskSummaryArray:
      type: array
      items:
        $ref: '#/components/schemas/TaskSummary'
    TaskTemplates:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        createdDateUtc:
          type: string
          format: date-time
      additionalProperties: false
    TaskTemplatesArray:
      type: array
      items:
        $ref: '#/components/schemas/TaskTemplates'
    TermsAndConditions:
      type: object
      properties:
        fileId:
          type: integer
          format: int32
        code:
          type: string
          nullable: true
        fileName:
          type: string
          nullable: true
      additionalProperties: false
